<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="model.*"%>
<%@ page import="dao.*"%>
<%@ page import="java.util.*"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	request.setCharacterEncoding("utf-8");
	response.setCharacterEncoding("utf-8");
	String user = (String)session.getAttribute("user");
	if(user!=null && user.equals("1")){
		
	}else {
		response.sendRedirect("Login.jsp");
	}
%>
<%
	String sid = request.getParameter("sid");
	Strategy st = new Strategy();
	st = StrategyDao.getStrategyNoCache(Integer.parseInt(sid));
	if (null == st) {
		st = new Strategy();
	}
	request.setAttribute("st", st);
%>
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8" />
<title>管理旅游攻略</title>


<jsp:include page="Header.jsp" flush="true"></jsp:include>


<!-- Latest Products -->
<div id="旅游景点">
	<div class="content-lg container">
		<div class="row margin-b-40">
			<div class="col-sm-6">
				<h2>管理旅游攻略</h2>
				<p></p>
			</div>
		</div>
		<!--// end row -->

			<div class="top-content">

		<div class="inner-bg">
			<div class="container">
				<div class="row">
					<div class="col-sm-10 col-sm-offset-1 form-box">
						<h1>
							<strong>重庆旅游网</strong> 攻略信息
						</h1>
						<div class="description">
							<p>
								欢迎来到重庆旅游网！ <a href="#"><strong></strong></a>
							</p>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-sm-10 col-sm-offset-1 form-box">
						<div class="form-top">
							<div class="form-top-left">
								<h3>攻略标题 : ${st.name }</h3> 
								<a class="btn btn-primary btn-large"
										href="<%=request.getContextPath()%>/UeditorDel?sid=${st.getId() }">删除</a>
									&nbsp;&nbsp;&nbsp;
									
									 <a class="btn btn-primary btn-large"
										href="<%=request.getContextPath()%>/admin/UpdateStrategy.jsp?sid=${st.id }">修改</a> &nbsp;&nbsp;&nbsp;
							</div>
							<div class="form-top-right"></div>
						</div>
						<div class="jumbotron">

							${st.info }

							<p></p>
						</div>

					</div>
				</div>
			</div>

		</div>
	</div>
</div>
<!-- End Latest Products -->

<jsp:include page="Footer.jsp" flush="true"></jsp:include>
<%
	String flag = "";
	String scerror = "";
	flag = (String) request.getAttribute("flag");
	System.out.println("jspflag" + flag);
	if (flag != null) {
		if (flag.equals("1")) {
			scerror = "删除成功。";
			out.print("<script language='javascript'>alert('" + scerror + "');</script>");
		}
		if (flag.equals("0")) {
			scerror = "删除失败。";
			out.print("<script language='javascript'>alert('" + scerror + "');</script>");
		}

	}
	System.out.println(scerror);
%>
<!-- Back To Top -->
<a href="javascript:void(0);" class="js-back-to-top back-to-top">Top</a>

<!-- JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
<!-- CORE PLUGINS -->
<script src="vendor/jquery.min.js" type="text/javascript"></script>
<script src="vendor/jquery-migrate.min.js" type="text/javascript"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js"
	type="text/javascript"></script>
</body>
<!-- END BODY -->
</html>